﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PlotDesigner
{
    public partial class SpeakerEditor : Form
    {
        DialogNode dlgNode;
        public SpeakerEditor(DialogNode dn)
        {
            dlgNode = dn;
            InitializeComponent();
        }

        private void SpeakerEditor_Load(object sender, EventArgs e)
        {
            comboBox_speaker.Items.Clear();
            comboBox_speaker.Text = dlgNode.Speaker;
            
            foreach(string s in Source.speakerList)
            {
                comboBox_speaker.Items.Add(s);
            }
        }

        private void btn_OK_Click(object sender, EventArgs e)
        {
            dlgNode.Speaker = comboBox_speaker.Text;
            this.Close();
            
        }
    }
}
